const redis = require('../../../redis/init')
const initArticles  =require('../../../redis/articlesinit.js')
const getArticleTotal = async (req,res)=>{
    if(redis.exists('articlesList')){
        const total =  await redis.lLen('articlesList')
        res.send({
            code:200,
            total
        })
    }
    else{
      initArticles(redis)
    }
}
module.exports  =getArticleTotal